package com.jiangnan.warehouse_management.pojo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.sql.Timestamp;

@TableName("outbound_records")
@Data
public class OutboundRecord {
    @TableId
    private Integer outboundId;
    private Integer itemId;
    private Integer warehouseId;
    private Integer quantity;
    private Double unitPrice;
    private Double totalAmount;
    private String recipient;
    private Integer operatorId;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    private Timestamp outboundTime;
    private String notes;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @TableField(fill = FieldFill.INSERT) // 仅插入时填充
    private Timestamp createdAt;
}